from django.db import models

class User(models.Model):
    username = models.CharField(max_length=32,null=False)
    pwd = models.CharField(max_length=32,null=False)

    def __str__(self):
        return self.username

class Conten(models.Model):
    tits = models.CharField(max_length=32,null=False)
    content= models.CharField(max_length=32,null=False)
    zt= models.BooleanField(default=1)
    time = models.DateField(auto_now_add=True)
    name = models.ForeignKey('User',on_delete=models.CASCADE)

    def __str__(self):
        return self.tits

